import request from '@/utils/request'
export default {
    //发送验证码        /user/user/sendsms/{mobile}  put
    sendSms:function(mobile) {
        return request({
            url: `/user/user/sendsms/${mobile}`,
            method: 'put'
          })
    },
    //用户注册   参数：验证码，用户对象        /user/user/register/{code}     post
    register:function(code,user) {
        return request({
            url: `/user/user/register/${code}`,
            method: 'post',
            data:user
        })
    },
    //用户登录   /user/user/login     post
    login:function(mobile,password) {
        return request({
            url: `/user/user/login `,
            method: 'post',
            data:{
                mobile,
                password
            }
        })
    }
}
